<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->

<head>
<meta charset="utf-8">
<title>SMM·支付 管理系统</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="" name="description">
<meta content="" name="author">
<link href="${request.getContextPath()}/Public/assets/admin/css/css.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/css/components-rounded.css" id="style_components" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/css/plugins.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/admin/css/layout.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/admin/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color">
<link href="${request.getContextPath()}/Public/assets/admin/css/custom.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.css" />
<link href="${request.getContextPath()}/Public/assets/admin/css/common.css" rel="stylesheet" type="text/css">
<link href="${request.getContextPath()}/Public/assets/global/css/kkpager.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="${request.getContextPath()}/Public/favicon.ico">
<link href="${request.getContextPath()}/Public/css/loading.css"
	rel="stylesheet" type="text/css">
<script>
	BASE_URL = '${request.getContextPath()}'
</script>
<style type="text/css">

.table-condensed {
	width: 100%;
}

.datepicker-inline {
	width: 100%;
}

.col-md-4,.col-md-6,.col-md-7,.col-md-12 {
	padding-right: 0px;
	padding-left: 0px;
}
.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
  border-bottom: 1px solid #ddd;
}
</style>

</head>

<body class="page-header-top-fixed page-footer-fixed">
	
	<div class="page-header">
		<!--头部开始-->
		<#include "/include/top.html" />
		<!-- 头部信息结束 -->
	</div>
	
	<div class="clearfix">
	</div>
	<div class="page-container">
		<#include "/include/menu.html" />
		<!-- 首页内容开始 -->
		<div class="page-content-wrapper">
		<div class="page-content" >
			<div id="loading" style="display: none;" class="loading"
						align="center">
						<br /> <br /> <br /> <br /> <img class="loadingimg"
							src="${request.getContextPath()}/Public/images/loading.gif" />
			</div>
		
			<div>
				<h2 class="modal-title" style="color: 61636c;">交易失败记录</h2>
			</div>
			<div class="container-fluid">
				<div class="col-md-12" style="margin-top: 50px;">
					<div class="row">
						<div class="col-md-12">
							<div class="portlet light">
									<div class="portlet-body">
										<div>			
										<table class="table table-striped table-bordered table-hover">
											<thead>
											<tr>
												<th>
													ID
												</th>
												<th>
													支付记录编号
												</th>
												<th>
													转出会员企业名称
												</th>
												<th>
													转入会员企业名称
												</th>
												<th>
													请求时间
												</th>
												<th>
													反馈时间
												</th>
												<th>
													交易状态
												</th>
												<th>
													失败原因
												</th>
												<th>
													操作
												</th>
											</tr>
											</thead>
											<tbody>
											<#list transferlist as list>
												<tr>
													<td>
														<#if list.id??>
												  			${list.id}
														<#else>
														</#if>
													</td>
													<td>
													 	<#if list.paymentId??>
												  			${list.paymentId}
														<#else>
														</#if>
													</td>
													<td>
														<#if list.outUserCompanyName??>
												  			${list.outUserCompanyName}
														<#else>
														</#if>
													</td>
													<td>
														<#if list.inUserCompanyName??>
												  			${list.inUserCompanyName}
														<#else>
														</#if>
													</td>
													<td>
														<#if list.applyTime??>
												  			${list.applyTime}
														<#else>
														</#if>
													</td>
													<td>
														<#if list.responseTime??>
												  			${list.responseTime}
														<#else>
														</#if>
													</td>
													<td style="color: red">
														失败
													</td>
													<td>
														<#if list.desc??>
												  			${list.desc}
														<#else>
														</#if>
													</td>
													<td>
														<a href="javascript:void(0);" onclick="refund('${list.paymentId}','${list.outUserCompanyName}')">退款</a>
													</td>
												</tr>
											</#list>	
											</tbody>
										</table>
										</div>
									</div>
								</div>
							</div>
						</div>	
					</div>
				</div>
			</div>
		</div>
		<!-- END PAGE CONTENT -->
	</div>
	<!-- END PAGE CONTAINER -->
	<!-- 底部开始 -->

	<!-- 底部结束 -->

	<!--[if lt IE 9]>
<script src="${request.getContextPath()}/Public/assets/global/plugins/respond.min.js"></script>
<script src="${request.getContextPath()}/Public/assets/global/plugins/excanvas.min.js"></script>
<![endif]-->
	<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.cokie.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.js"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/jquery.sparkline.min.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker-index.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/scripts/metronic.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/admin/scripts/layout.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/admin/scripts/commonUtils.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/highcharts.js" type="text/javascript"></script>
	<script src="${request.getContextPath()}/Public/assets/global/plugins/kkpager.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="${request.getContextPath()}/Public/My97DatePicker/WdatePicker.js"></script>
	
	<!-- pandora-dialog 弹层组件 -->
	<script type="text/javascript" src="${request.getContextPath()}/Public/js/pandora/pandora-dialog.js"></script>
		<!-- pandora-dialog 弹层组件样式 -->
	<link
	href="${request.getContextPath()}/Public/js/pandora/css/dialog.css"
	rel="stylesheet" type="text/css">
	<script>
		jQuery(document).ready(function() {

			Metronic.init(); // init metronic core componets
			Layout.init(); // init layout
			//IndexComponent.init(); // init index component
		});
		
		//确认退款
		function refund(paymentid,companyName) {
		 	$.confirm("是否确定退款?", function () {
			document.getElementById("loading").style.display ="block";
		    	var resultCode; 
				$.ajax({
					url : "${request.getContextPath()}/transferRecord/refund.do",
					type : "post",
					dataType:'JSON',
					data:{"paymentid":paymentid,"companyName":companyName},
					success : function(result) {
					document.getElementById("loading").style.display ="none";
						if (result.info == "success") {
							alert("退款成功！");
							window.location.href="${request.getContextPath()}/transferRecord/list.do?";	
						}else{
							alert("退款失败！");
//							window.location.href="${request.getContextPath()}/transferRecord/list.do?";	
						}
					}
				});
			});
			return false;
		}
	</script>
</body>
</html>